package com.glsc.ngateway.common.api.flowable.dto.task.formData.equipment.domainDto;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateSerializer;
import com.glsc.ngateway.common.api.flowable.dto.AppendixDto;
import com.glsc.ngateway.common.api.flowable.dto.task.FlowFormBaseEntityDto;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDate;
import java.util.List;

/**
 * @author xuchang
 */
@EqualsAndHashCode(callSuper = true)
@SuperBuilder
@Data
@NoArgsConstructor
@AllArgsConstructor
public class FlowFormEquipmentOfflineDto extends FlowFormBaseEntityDto {

    private static final long serialVersionUID = 5700921284211853102L;

    @ApiModelProperty(value = "希望使用日期")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd")
    @JsonSerialize(using = LocalDateSerializer.class)
    @JsonDeserialize(using = LocalDateDeserializer.class)
    private LocalDate flowDesiredDate;

    @ApiModelProperty(value = "其他")
    private String others;

    @ApiModelProperty(value = "附件")
    private List<AppendixDto> appendicesFileList;

    @ApiModelProperty(value = "是否回收IP地址")
    String recycleIpAddress;

}
